package com.weixin.gong.example.jdk.bean;

import org.junit.Test;

import java.util.Collections;
import java.util.List;

/**
 * Created at 2017/8/22 11:47
 *
 * @author gongweixin
 */
public class EmptyListExample {
    @Test(expected = java.lang.UnsupportedOperationException.class)
    public void testAdd() {
        List emptyList = Collections.EMPTY_LIST;
        emptyList.add(new Object());
    }
}
